﻿using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WpfApp1.Services;

namespace WpfApp1.ViewModels
{
  public partial  class LoginViewModel : ObservableObject
    {
        private readonly ILoginUserService _loginService;
        public LoginViewModel(ILoginUserService loginUserService)
        {
            _loginService= loginUserService;
        }
        [ObservableProperty]
        private string phone;

      
        [RelayCommand]
        public async Task<ApiResponse<string>> SendCode(string phone)
        {
            return await _loginService.SendCode(phone);
        }
    }
}
